package com.yihaodian.search.code.manage;

import com.yihaodian.search.code.service.SourceIndexService;
import com.yihaodian.search.code.service.impl.SourceIndexImpl;


public class SourceIndexManager {
	public static String baseDir = "/var/www/data/searchcode/";
	
	public static final String[] repository = {
		"http://svn.yihaodian.com/svn/source/yihaodian/IT3/branches/804-domain/search-code",
		"http://svn.yihaodian.com/svn/source/yihaodian/IT3/branches/804-domain/search-mars",
		"http://svn.yihaodian.com/svn/source/yihaodian/IT3/main/search-mandy/search-mandy-api",
		"http://svn.yihaodian.com/svn/source/yihaodian/IT3/main/search-mandy/search-mandy-server",
		"http://svn.yihaodian.com/svn/source/yihaodian/IT3/main/search-fulltext",
		"http://svn.yihaodian.com/svn/source/yihaodian/IT3/main/search/search-databus",
		"http://svn.yihaodian.com/svn/source/yihaodian/IT3/main/search/search-databus-client",
		"http://svn.yihaodian.com/svn/source/yihaodian/IT3/main/search/search-data-service",
		"http://svn.yihaodian.com/svn/source/yihaodian/IT3/main/front-search"
	};
	
	public static final String[] projectName = {
		"search-code",
		"search-mars",
		"search-mandy-api",
		"search-mandy-server",
		"search-fulltext",
		"search-databus",
		"search-databus-client",
		"search-data-service",
		"front-search"
	};
	
	
	SourceIndexService indexService = new SourceIndexImpl();
	
	public void doIndex(){
		
		for(int i = 0; i < repository.length; i++)
		{
			indexService.updateSources(repository[i], 
					baseDir + projectName[i], projectName[i]);
		}
		
		
	}
	
}
